package ooday03.practise.practise_01;

public class Fish extends Animal implements Fuctional {
    public Fish(){

    }
    public Fish(String name,int age,String color){
        super(name,age,color);
    }

    @Override
    public void eat() {
        System.out.println(getColor()+"的"+getAge()+"岁的小鱼"+getName()+"在吃虾米");
    }

    @Override
    public void swim() {
        System.out.println(getColor()+"的"+getAge()+"岁的小鱼"+getName()+"会游泳");
    }

    @Override
    public String toString() {
        return "Fish{" +
                "name='" + getName() + '\'' +
                ", age=" + getAge() +
                ", color='" + getColor() + '\'' +
                '}';
    }
}
